package com.ruicar.afs.cloud.product.vo;

import cn.hutool.core.util.ArrayUtil;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @author changyu.gui
 * @version 1.0
 * @date 2020/5/14 0:37
 */
@Data
public class FormOptionsVo {
    private Boolean isGroup = true;
    private String groupName;
    private Grids[] grids;

    public FormOptionsVo(List<List<String>> list, String groupName) {
        List<Grids> gridsList = new ArrayList<>();
        for (List<String> strList : list) {
            Grids gridsr = new Grids(strList);
            gridsList.add(gridsr);
        }
        this.groupName = groupName;
        /*      this.groupName= SHOW_TYPE_ENUM.getTitle(groupName);*/
        this.grids = ArrayUtil.toArray(gridsList, Grids.class);
    }
}
